<?php

session_start();
include_once 'functions/function.php';
include_once 'functions/newTopic.class.php';

$Db = Db();


if(!isset($_SESSION['id'])){
    
     
    session_start();
    session_unset();
    session_destroy();

    header('Location: index.php');
}

if(isset($_GET['topicID']) AND isset($_GET['forumID'])){
    $topicDeletion = deleteTopic($_GET['topicID'], $_GET['forumID']);//delete the forum
    header('Location : home.php'); //send you back to the index
}
else{
    header('Location : home.php');
    $display = "Sorry, unable to delete topic";
}

?>